#include "task_sys.h"

#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "croutine.h"


#include "task_iic.h"
#include "task_spi.h"
#include "task_uart.h"
#include "task_adc.h"
#include "task_dac.h"
#include "task_io.h"
#include "task_key.h"


TaskHandle_t xHandleTaskSys = NULL;
unsigned portBASE_TYPE stack[7];

float v=0;

void vTask_Sys(void *pvParameters)
{
	static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
	TickType_t pxPreviousWakeTime = xTaskGetTickCount();
	while(1)
	{
		vTaskDelayUntil(&pxPreviousWakeTime, 1000 / portTICK_RATE_MS );

		stack[0]=uxTaskGetStackHighWaterMark( xHandleTaskIIC );
		stack[1]=uxTaskGetStackHighWaterMark( xHandleTaskSPI );
		stack[2]=uxTaskGetStackHighWaterMark( xHandleTaskUART );
		stack[3]=uxTaskGetStackHighWaterMark( xHandleTaskADC );
		stack[4]=uxTaskGetStackHighWaterMark( xHandleTaskDAC );
		stack[5]=uxTaskGetStackHighWaterMark( xHandleTaskGPIO );
		stack[6]=uxTaskGetStackHighWaterMark( xHandleTaskKEY);
	}
} 
  